
<div class="row">
<?if(isset($system_message))echo $system_message;
echo validation_errors('<div class="error">', '</div>');
?>
<div>
	<p style="border-bottom:3px solid #000;padding-bottom:5px;font-weight:bold;">Update Grade Levels</p>
		<div class="notice" style="max-width:800px;">
			</p><span class="bold big">Level Hierarchy</span> will be used by the system for determining what grade level to assign an incoming enrollee from the parent/student or registrar page.	Please set your grade level in hierarchial order according to their grade order.
			</p>
			</p><span class="bold big">Level Status</span> if active or inactive</p>
		</div>
		<?if(!empty($grade_level_data)):?>
			<form action="<?site_url('room_section_subject/update_grade_level')?>" method="POST">
			<table class="data-table">
				<tbody class="tabular">
					<?foreach($grade_level_data as $key => $val):?>
					<tr style="border-bottom:#ddd 1px solid;">
						<td>Level Code:<input type="text" name="grade_levels[<?=$val->level_id;?>][level_code]" value="<?=set_value('grade_levels['.$val->level_id.'][level_code].',$val->level_code);?>"></td>
						<td>Level Desc:<input type="text" name="grade_levels[<?=$val->level_id;?>][level_desc]" value="<?=set_value('grade_levels['.$val->level_id.'][level_desc].',$val->level_desc);?>"></td>
						<td>Level Status:<?=form_dropdown('grade_levels['.$val->level_id.'][level_stat]',$status_opt,$val->level_stat);?></td>
						<td>Level Category:<?=form_dropdown('grade_levels['.$val->level_id.'][level_category]',$category_opt,$val->level_category);?></td>
						<td>Level Hierarchy:<?=form_dropdown('grade_levels['.$val->level_id.'][level_hierarchy]',$level_heiarchy_opt,$val->level_hierarchy);?></td>
						<td>ID Code:<input type="text" name="grade_levels[<?=$val->level_id;?>][level_code_for_id]" value="<?=set_value('grade_levels['.$val->level_id.'][level_code_for_id].',$val->level_code_for_id);?>"></td>
						<input type="hidden" name="grade_levels[<?=$val->level_id;?>][level_id]" value="<?=$val->level_id;?>">
						<td>Grade:<?=form_dropdown('grade_levels['.$val->level_id.'][grade_type]',array('numeric'=>'Numeric','smiley'=>'Smiley'),$val->grade_type);?></td>
					</tr>
					<?endforeach;?>
				</tbody>
			</table>
				<input type="submit" name="update_grade_levels" class="button tiny"value="Update Grade Levels">
				<a href="<?=site_url('room_section_subject/grade_level');?>" class="btn btn-small btn-primary">Go Back to View Grade Level</a>
			</form>
		<?else:?>
			<div class="notice">No Grade levels have been set</div>
		<?endif;?>
</div>
</div>